from django.db import models
from django.contrib.auth.models import AbstractUser


class Account(AbstractUser):
    uid = models.BigAutoField(primary_key=True)
    avatar = models.CharField(verbose_name="头像", max_length=150, default="/media/avatar.png")
    crete_time = models.DateTimeField(verbose_name="注册时间", auto_now_add=True)
    class Meta:
        db_table = 'account'
        verbose_name = '用户'
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.username
